# coding:utf-8

from django.conf import settings
from django.shortcuts import redirect
from django.utils import translation

def lang_switch(request):
    request.session['django_language'] = request.GET.get("code", "ru")
    translation.activate(request.session['django_language'])
    return redirect( request.GET.get("next", "/") )

